package cola.rh.controller;

import cola.rh.entity.Cola;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *@ClassName ColaController
 *@Author Cola
 *@DATE 2023/4/7 8:22 PM
 *@Description ColaController
 *@Version 1.0
 */
@RestController
@RequestMapping("api/v1/cola")
public class ColaController {

    @GetMapping("hello")
    String cola(){
        return "HelloCola";
    }

    @PostMapping("save")
    Cola saveCola(){
        Cola cola = new Cola();

        cola.setId(1);
        cola.setName("cola");
        cola.setAge(21);

        return cola;
    }

}
